'Download any file from the Internet on your Computer.

'For this example, create a Command Button with the name Command1.

' Written by Sanchit Karve [ born2c0de ]

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Private Sub Command1_Click()
   Dim tmp as Long   
   tmp = URLDownloadToFile(0, "http://example.urlwebsite.com/file.txt", "c:\examplepath\file.txt", 0, 0)
End Sub